

public class Login {
	private String username = "";
	private String password = "";
	private MyQuery query;


	public Login(String username, String password)
	{
		this.username = username;
		this.password = password; 
		query = new MyQuery();
	}

	/**
	 * GUI METHOD
	 * Use this method to output result to user.
	 * @return String -- The string is to output to the user
	 */
	private String authenticateToUser()
	{
		MyQuery temp = new MyQuery();
		Boolean check;
		try {
			check = temp.authenticateUser(password, username);
			if (check==true)
				return "Login Successful";
			else return "Check Username and Password";
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return "Exception Error";
		}
	}

	


}


